<?php
    class Online_Model extends CI_Model
    {
        var $table_sub = "db_sub_online";
        var $table = "db_users_online";
        function __construct()
        {
            parent::__construct();
        }
        function list_group_online()
        {
            $this->db->order_by('order_sub','asc');
            $this->db->where('active',1);
            return $this->db->get($this->table_sub)->result();
            $this->db->get($this->table_sub)->free_result();
        }
        function list_nick_online($id)
        {
            $this->db->where('id_sub',$id);
            $this->db->order_by('order_users','asc');
            $this->db->where('active',1);
            return $this->db->get($this->table)->result();
            
        }
    }
?>